package com.wn.api;

import com.wn.api.fallback.UserApiFallBack;
import com.wn.bean.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author yellow Docter
 * @date 2023 -08-07
 * @desc
 */
@FeignClient(
        value = "USER-PROVIDER",
        fallback = UserApiFallBack.class)   //fegin接口中指定回调
public interface UserApi {

    @GetMapping("/user/get/{id}")
    public User findUserById(@PathVariable("id") Integer id);

}
